import { createApp } from 'vue'

import './style.css'
import App from './App.vue'

import router from './router'

import ElementPlus from 'element-plus'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import 'element-plus/dist/index.css'
import 'element-plus/theme-chalk/display.css'

import 'font-awesome/css/font-awesome.min.css'
import Icon from './components/icon/index.vue'
import * as ElIcon from '@element-plus/icons-vue'

const app = createApp(App)
app.use(router)
app.use(ElementPlus, {
    locale: zhCn,
})

app.component('Icon', Icon)
/*
 * 全局注册element Plus的icon
 */
const icons = ElIcon as any
for (const i in icons) {
    app.component(`el-icon-${icons[i].name}`, icons[i])
}
app.mount('#app')
